package com.example.ViewPagerSum.task;

import com.example.ViewPagerSum.client.HomeClientAPI;
import com.example.ViewPagerSum.domain.ResultTask;
import com.example.ViewPagerSum.interfaces.FinishedCallBack;
import com.example.ViewPagerSum.util.Constants;
import org.json.JSONObject;

/**
 * ============================================================
 * author：     王景
 * <p/>
 * time：       2015/9/22  19:22.
 * <p/>
 * email:     wjontheway@163.com
 * <p/>
 * description：
 * <p/>
 * ============================================================
 */
public class PortraitTask extends BaseTask {

    public PortraitTask(FinishedCallBack mFinishedCallBack) {
        super(mFinishedCallBack);
    }

    @Override
    protected ResultTask doInBackground(String... params) {

        ResultTask resultTask = null;
        if (params != null) {
            resultTask = new ResultTask();
            JSONObject portrait = HomeClientAPI.getPortrait();
            resultTask.action = Constants.ACTION_PORTRAIT_TASK;
            resultTask.data = portrait;
        }
        return resultTask;
    }
}
